<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <style>
      .green {
        background-color: green;
      }
    </style>
  </head>
  <body>
    <input type="submit" value="(通过标签名)给a链接添加地址" id="b2" onclick="addHref()"/>
    <input type="button" value="(通过name属性)给div设值" id="b2" />
    <input type="button" value="(通过类名)给div设值" id="b4" />
    <hr />
    <a class="a b aaa">百度一下</a><br />
    <a>百度一下</a><br />
    <a>百度一下</a><br />
    <hr />
    <div name="one">one-1</div>
    <div name="one">one-2</div>
    <p name="one">one-3</p>
    <hr />
    <div class="two">
      two-1
      <div class="two">two-1-1</div>
    </div>
    <div class="two">two-2</div>
    <div class="two">two-3</div>
    <script src="01.js"></script>
  </body>
</html>
